home *** CD-ROM | disk | FTP | other *** search
- ;*********************************************** ; GUI source created with:
- ; Blitz 2 GUI Generator V1.7
- ; (C) Copyright 1993-1995 Creative Software. ;
- ; Registered To: Simon Archer ; User Number
- : 1 ;
- ; GUI Designed By:
- ; Simon Archer ;
- ; Converted from a GUI file created using ; GadToolsBox V2.0. The ultimate GUI Creator!
- ;*********************************************** ;
- WBStartup ; start from Workbench
- NoCli ; no default CLI
- ;
- .InitialiseVars
- ;
- Project0Wnd = 0
- Project0GList = 0 ; This represents the gadgetlist number. Change to suit
- Project0Scr = 0 ; This represents the screen number. Change to suit ;
- FindScreen Project0Scr
- ;Lets grab the screen's structure...
- *scr.Screen = Peek.l(Addr Screen(Project0Scr)) ;
- ; Load the font to use with this GUI...
- Project0Font$ = "topaz.font"
- Project0FontSize = 8
- LoadFont 1,Project0Font$,Project0FontSize : Use IntuiFont 1 ;
- ; This is the NEWTYPE variable for the list used by the ListView gadget
- NEWTYPE .listview
- pad.w ; This is a limitation of Blitz 2
- string.s
- End NEWTYPE
- ;
- ;Fill the TextAttr structure
- Project0FontAttr.TextAttr\ta_Name = &Project0Font$,Project0FontSize,0,0 ;
- ;This sets font sensitivity for the screen.. *scr\Font\ta_Name =
- Project0FontAttr\ta_Name ;
- Dim List Project0ListV0.listview(4)
- ;This list is used by your listview gadget. ;
- If AddItem(Project0ListV0()) Then Project0ListV0()\pad = 13,"My First Item" If
- AddItem(Project0ListV0()) Then Project0ListV0()\pad = 14,"My Second Item" If
- AddItem(Project0ListV0()) Then Project0ListV0()\pad = 13,"My Third Item" If
- AddItem(Project0ListV0()) Then Project0ListV0()\pad = 12,"My Last Item" GTTags
- #GTLV_ShowSelected,0
- GTListView windonum,50,5,3,413,88,"",$0,Project0ListV0.listview(),0,0 ;
- ; Define the window...
- AddIDCMP $024C077E ; set the IDCMP tags for window Window
- windonum,95,55,431,109,$20100E,"ListView Test",0,1 ;
- AttachGTList windonum,windonum
- ;
- ;
- .MainEventHandler
- ;
- Repeat
- ev.l = WaitEvent ; wait for IDCMP event
- k$ = Inkey$ ; store key press, if any.
- If ev = $40 AND EventWindow = windonum ; gadget been hit
- If GadgetHit = 50 ; Action for ListViewGad here
- EndIf
- EndIf
- If k$ = Chr$(27) Then Goto _quit ; this allows us to break out! Until ev =
- $200 Then Goto _quit ; close gadget ;
- ._quit ; this can be used to build custom exit End ; quit now!
-